/*
Image processing project : Rotate.

Function: Rotating an image by your given angle.

LUT for sin(angle).

Copyright (C) 2015  Dai Tianyu (dtysky)

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Homepage for this project:
	http://ifl.dtysky.moe

Sources for this project:
	https://github.com/dtysky/FPGA-Imaging-Library

My e-mail:
	dtysky@outlook.com

My blog:
	http://dtysky.moe

*/

`timescale 1ns / 1ps

module SinLUT(angle, value);
	input[8 : 0] angle;
	output[19 : 0] value;
	reg[19 : 0] reg_value;
	assign value = reg_value;
	always@(*) begin
		case(angle)
			0 : reg_value <= 20'b00000000000000000000;
			1 : reg_value <= 20'b00000001000111011110;
			2 : reg_value <= 20'b00000010001110111100;
			3 : reg_value <= 20'b00000011010110010111;
			4 : reg_value <= 20'b00000100011101101110;
			5 : reg_value <= 20'b00000101100100111111;
			6 : reg_value <= 20'b00000110101100001001;
			7 : reg_value <= 20'b00000111110011001011;
			8 : reg_value <= 20'b00001000111010000011;
			9 : reg_value <= 20'b00001010000000110000;
			10 : reg_value <= 20'b00001011000111010000;
			11 : reg_value <= 20'b00001100001101100011;
			12 : reg_value <= 20'b00001101010011100110;
			13 : reg_value <= 20'b00001110011001011001;
			14 : reg_value <= 20'b00001111011110111010;
			15 : reg_value <= 20'b00010000100100000111;
			16 : reg_value <= 20'b00010001101001000000;
			17 : reg_value <= 20'b00010010101101100011;
			18 : reg_value <= 20'b00010011110001101110;
			19 : reg_value <= 20'b00010100110101100001;
			20 : reg_value <= 20'b00010101111000111010;
			21 : reg_value <= 20'b00010110111011111000;
			22 : reg_value <= 20'b00010111111110011000;
			23 : reg_value <= 20'b00011001000000011011;
			24 : reg_value <= 20'b00011010000001111111;
			25 : reg_value <= 20'b00011011000011000010;
			26 : reg_value <= 20'b00011100000011100100;
			27 : reg_value <= 20'b00011101000011100010;
			28 : reg_value <= 20'b00011110000010111101;
			29 : reg_value <= 20'b00011111000001110010;
			30 : reg_value <= 20'b00100000000000000000;
			31 : reg_value <= 20'b00100000111101100110;
			32 : reg_value <= 20'b00100001111010100011;
			33 : reg_value <= 20'b00100010110110110101;
			34 : reg_value <= 20'b00100011110010011101;
			35 : reg_value <= 20'b00100100101101010111;
			36 : reg_value <= 20'b00100101100111100100;
			37 : reg_value <= 20'b00100110100001000010;
			38 : reg_value <= 20'b00100111011001101111;
			39 : reg_value <= 20'b00101000010001101100;
			40 : reg_value <= 20'b00101001001000110111;
			41 : reg_value <= 20'b00101001111111001101;
			42 : reg_value <= 20'b00101010110100110000;
			43 : reg_value <= 20'b00101011101001011101;
			44 : reg_value <= 20'b00101100011101010100;
			45 : reg_value <= 20'b00101101010000010011;
			46 : reg_value <= 20'b00101110000010011010;
			47 : reg_value <= 20'b00101110110011101000;
			48 : reg_value <= 20'b00101111100011111011;
			49 : reg_value <= 20'b00110000010011010010;
			50 : reg_value <= 20'b00110001000001101101;
			51 : reg_value <= 20'b00110001101111001100;
			52 : reg_value <= 20'b00110010011011101100;
			53 : reg_value <= 20'b00110011000111001101;
			54 : reg_value <= 20'b00110011110001101110;
			55 : reg_value <= 20'b00110100011011001111;
			56 : reg_value <= 20'b00110101000011101111;
			57 : reg_value <= 20'b00110101101011001100;
			58 : reg_value <= 20'b00110110010001100110;
			59 : reg_value <= 20'b00110110110110111101;
			60 : reg_value <= 20'b00110111011011001111;
			61 : reg_value <= 20'b00110111111110011100;
			62 : reg_value <= 20'b00111000100000100011;
			63 : reg_value <= 20'b00111001000001100100;
			64 : reg_value <= 20'b00111001100001011101;
			65 : reg_value <= 20'b00111010000000001111;
			66 : reg_value <= 20'b00111010011101111000;
			67 : reg_value <= 20'b00111010111010011000;
			68 : reg_value <= 20'b00111011010101101111;
			69 : reg_value <= 20'b00111011101111111100;
			70 : reg_value <= 20'b00111100001000111110;
			71 : reg_value <= 20'b00111100100000110110;
			72 : reg_value <= 20'b00111100110111100001;
			73 : reg_value <= 20'b00111101001101000001;
			74 : reg_value <= 20'b00111101100001010101;
			75 : reg_value <= 20'b00111101110100011011;
			76 : reg_value <= 20'b00111110000110010101;
			77 : reg_value <= 20'b00111110010111000001;
			78 : reg_value <= 20'b00111110100110011111;
			79 : reg_value <= 20'b00111110110100101111;
			80 : reg_value <= 20'b00111111000001110001;
			81 : reg_value <= 20'b00111111001101100100;
			82 : reg_value <= 20'b00111111011000001000;
			83 : reg_value <= 20'b00111111100001011101;
			84 : reg_value <= 20'b00111111101001100011;
			85 : reg_value <= 20'b00111111110000011010;
			86 : reg_value <= 20'b00111111110110000001;
			87 : reg_value <= 20'b00111111111010011000;
			88 : reg_value <= 20'b00111111111101100000;
			89 : reg_value <= 20'b00111111111111011000;
			90 : reg_value <= 20'b01000000000000000000;
			91 : reg_value <= 20'b00111111111111011000;
			92 : reg_value <= 20'b00111111111101100000;
			93 : reg_value <= 20'b00111111111010011000;
			94 : reg_value <= 20'b00111111110110000001;
			95 : reg_value <= 20'b00111111110000011010;
			96 : reg_value <= 20'b00111111101001100011;
			97 : reg_value <= 20'b00111111100001011101;
			98 : reg_value <= 20'b00111111011000001000;
			99 : reg_value <= 20'b00111111001101100100;
			100 : reg_value <= 20'b00111111000001110001;
			101 : reg_value <= 20'b00111110110100101111;
			102 : reg_value <= 20'b00111110100110011111;
			103 : reg_value <= 20'b00111110010111000001;
			104 : reg_value <= 20'b00111110000110010101;
			105 : reg_value <= 20'b00111101110100011011;
			106 : reg_value <= 20'b00111101100001010101;
			107 : reg_value <= 20'b00111101001101000001;
			108 : reg_value <= 20'b00111100110111100001;
			109 : reg_value <= 20'b00111100100000110110;
			110 : reg_value <= 20'b00111100001000111110;
			111 : reg_value <= 20'b00111011101111111100;
			112 : reg_value <= 20'b00111011010101101111;
			113 : reg_value <= 20'b00111010111010011000;
			114 : reg_value <= 20'b00111010011101111000;
			115 : reg_value <= 20'b00111010000000001111;
			116 : reg_value <= 20'b00111001100001011101;
			117 : reg_value <= 20'b00111001000001100100;
			118 : reg_value <= 20'b00111000100000100011;
			119 : reg_value <= 20'b00110111111110011100;
			120 : reg_value <= 20'b00110111011011001111;
			121 : reg_value <= 20'b00110110110110111101;
			122 : reg_value <= 20'b00110110010001100110;
			123 : reg_value <= 20'b00110101101011001100;
			124 : reg_value <= 20'b00110101000011101111;
			125 : reg_value <= 20'b00110100011011001111;
			126 : reg_value <= 20'b00110011110001101110;
			127 : reg_value <= 20'b00110011000111001101;
			128 : reg_value <= 20'b00110010011011101100;
			129 : reg_value <= 20'b00110001101111001100;
			130 : reg_value <= 20'b00110001000001101101;
			131 : reg_value <= 20'b00110000010011010010;
			132 : reg_value <= 20'b00101111100011111011;
			133 : reg_value <= 20'b00101110110011101000;
			134 : reg_value <= 20'b00101110000010011010;
			135 : reg_value <= 20'b00101101010000010011;
			136 : reg_value <= 20'b00101100011101010100;
			137 : reg_value <= 20'b00101011101001011101;
			138 : reg_value <= 20'b00101010110100110000;
			139 : reg_value <= 20'b00101001111111001101;
			140 : reg_value <= 20'b00101001001000110111;
			141 : reg_value <= 20'b00101000010001101100;
			142 : reg_value <= 20'b00100111011001101111;
			143 : reg_value <= 20'b00100110100001000010;
			144 : reg_value <= 20'b00100101100111100100;
			145 : reg_value <= 20'b00100100101101010111;
			146 : reg_value <= 20'b00100011110010011101;
			147 : reg_value <= 20'b00100010110110110101;
			148 : reg_value <= 20'b00100001111010100011;
			149 : reg_value <= 20'b00100000111101100110;
			150 : reg_value <= 20'b00100000000000000000;
			151 : reg_value <= 20'b00011111000001110010;
			152 : reg_value <= 20'b00011110000010111101;
			153 : reg_value <= 20'b00011101000011100010;
			154 : reg_value <= 20'b00011100000011100100;
			155 : reg_value <= 20'b00011011000011000010;
			156 : reg_value <= 20'b00011010000001111111;
			157 : reg_value <= 20'b00011001000000011011;
			158 : reg_value <= 20'b00010111111110011000;
			159 : reg_value <= 20'b00010110111011111000;
			160 : reg_value <= 20'b00010101111000111010;
			161 : reg_value <= 20'b00010100110101100001;
			162 : reg_value <= 20'b00010011110001101110;
			163 : reg_value <= 20'b00010010101101100011;
			164 : reg_value <= 20'b00010001101001000000;
			165 : reg_value <= 20'b00010000100100000111;
			166 : reg_value <= 20'b00001111011110111010;
			167 : reg_value <= 20'b00001110011001011001;
			168 : reg_value <= 20'b00001101010011100110;
			169 : reg_value <= 20'b00001100001101100011;
			170 : reg_value <= 20'b00001011000111010000;
			171 : reg_value <= 20'b00001010000000110000;
			172 : reg_value <= 20'b00001000111010000011;
			173 : reg_value <= 20'b00000111110011001011;
			174 : reg_value <= 20'b00000110101100001001;
			175 : reg_value <= 20'b00000101100100111111;
			176 : reg_value <= 20'b00000100011101101110;
			177 : reg_value <= 20'b00000011010110010111;
			178 : reg_value <= 20'b00000010001110111100;
			179 : reg_value <= 20'b00000001000111011110;
			180 : reg_value <= 20'b00000000000000000000;
			181 : reg_value <= 20'b11111110111000100010;
			182 : reg_value <= 20'b11111101110001000100;
			183 : reg_value <= 20'b11111100101001101001;
			184 : reg_value <= 20'b11111011100010010010;
			185 : reg_value <= 20'b11111010011011000001;
			186 : reg_value <= 20'b11111001010011110111;
			187 : reg_value <= 20'b11111000001100110101;
			188 : reg_value <= 20'b11110111000101111101;
			189 : reg_value <= 20'b11110101111111010000;
			190 : reg_value <= 20'b11110100111000110000;
			191 : reg_value <= 20'b11110011110010011101;
			192 : reg_value <= 20'b11110010101100011010;
			193 : reg_value <= 20'b11110001100110100111;
			194 : reg_value <= 20'b11110000100001000110;
			195 : reg_value <= 20'b11101111011011111001;
			196 : reg_value <= 20'b11101110010111000000;
			197 : reg_value <= 20'b11101101010010011101;
			198 : reg_value <= 20'b11101100001110010010;
			199 : reg_value <= 20'b11101011001010011111;
			200 : reg_value <= 20'b11101010000111000110;
			201 : reg_value <= 20'b11101001000100001000;
			202 : reg_value <= 20'b11101000000001101000;
			203 : reg_value <= 20'b11100110111111100101;
			204 : reg_value <= 20'b11100101111110000001;
			205 : reg_value <= 20'b11100100111100111110;
			206 : reg_value <= 20'b11100011111100011100;
			207 : reg_value <= 20'b11100010111100011110;
			208 : reg_value <= 20'b11100001111101000011;
			209 : reg_value <= 20'b11100000111110001110;
			210 : reg_value <= 20'b11100000000000000000;
			211 : reg_value <= 20'b11011111000010011010;
			212 : reg_value <= 20'b11011110000101011101;
			213 : reg_value <= 20'b11011101001001001011;
			214 : reg_value <= 20'b11011100001101100011;
			215 : reg_value <= 20'b11011011010010101001;
			216 : reg_value <= 20'b11011010011000011100;
			217 : reg_value <= 20'b11011001011110111110;
			218 : reg_value <= 20'b11011000100110010001;
			219 : reg_value <= 20'b11010111101110010100;
			220 : reg_value <= 20'b11010110110111001001;
			221 : reg_value <= 20'b11010110000000110011;
			222 : reg_value <= 20'b11010101001011010000;
			223 : reg_value <= 20'b11010100010110100011;
			224 : reg_value <= 20'b11010011100010101100;
			225 : reg_value <= 20'b11010010101111101101;
			226 : reg_value <= 20'b11010001111101100110;
			227 : reg_value <= 20'b11010001001100011000;
			228 : reg_value <= 20'b11010000011100000101;
			229 : reg_value <= 20'b11001111101100101110;
			230 : reg_value <= 20'b11001110111110010011;
			231 : reg_value <= 20'b11001110010000110100;
			232 : reg_value <= 20'b11001101100100010100;
			233 : reg_value <= 20'b11001100111000110011;
			234 : reg_value <= 20'b11001100001110010010;
			235 : reg_value <= 20'b11001011100100110001;
			236 : reg_value <= 20'b11001010111100010001;
			237 : reg_value <= 20'b11001010010100110100;
			238 : reg_value <= 20'b11001001101110011010;
			239 : reg_value <= 20'b11001001001001000011;
			240 : reg_value <= 20'b11001000100100110001;
			241 : reg_value <= 20'b11001000000001100100;
			242 : reg_value <= 20'b11000111011111011101;
			243 : reg_value <= 20'b11000110111110011100;
			244 : reg_value <= 20'b11000110011110100011;
			245 : reg_value <= 20'b11000101111111110001;
			246 : reg_value <= 20'b11000101100010001000;
			247 : reg_value <= 20'b11000101000101101000;
			248 : reg_value <= 20'b11000100101010010001;
			249 : reg_value <= 20'b11000100010000000100;
			250 : reg_value <= 20'b11000011110111000010;
			251 : reg_value <= 20'b11000011011111001010;
			252 : reg_value <= 20'b11000011001000011111;
			253 : reg_value <= 20'b11000010110010111111;
			254 : reg_value <= 20'b11000010011110101011;
			255 : reg_value <= 20'b11000010001011100101;
			256 : reg_value <= 20'b11000001111001101011;
			257 : reg_value <= 20'b11000001101000111111;
			258 : reg_value <= 20'b11000001011001100001;
			259 : reg_value <= 20'b11000001001011010001;
			260 : reg_value <= 20'b11000000111110001111;
			261 : reg_value <= 20'b11000000110010011100;
			262 : reg_value <= 20'b11000000100111111000;
			263 : reg_value <= 20'b11000000011110100011;
			264 : reg_value <= 20'b11000000010110011101;
			265 : reg_value <= 20'b11000000001111100110;
			266 : reg_value <= 20'b11000000001001111111;
			267 : reg_value <= 20'b11000000000101101000;
			268 : reg_value <= 20'b11000000000010100000;
			269 : reg_value <= 20'b11000000000000101000;
			270 : reg_value <= 20'b11000000000000000000;
			271 : reg_value <= 20'b11000000000000101000;
			272 : reg_value <= 20'b11000000000010100000;
			273 : reg_value <= 20'b11000000000101101000;
			274 : reg_value <= 20'b11000000001001111111;
			275 : reg_value <= 20'b11000000001111100110;
			276 : reg_value <= 20'b11000000010110011101;
			277 : reg_value <= 20'b11000000011110100011;
			278 : reg_value <= 20'b11000000100111111000;
			279 : reg_value <= 20'b11000000110010011100;
			280 : reg_value <= 20'b11000000111110001111;
			281 : reg_value <= 20'b11000001001011010001;
			282 : reg_value <= 20'b11000001011001100001;
			283 : reg_value <= 20'b11000001101000111111;
			284 : reg_value <= 20'b11000001111001101011;
			285 : reg_value <= 20'b11000010001011100101;
			286 : reg_value <= 20'b11000010011110101011;
			287 : reg_value <= 20'b11000010110010111111;
			288 : reg_value <= 20'b11000011001000011111;
			289 : reg_value <= 20'b11000011011111001010;
			290 : reg_value <= 20'b11000011110111000010;
			291 : reg_value <= 20'b11000100010000000100;
			292 : reg_value <= 20'b11000100101010010001;
			293 : reg_value <= 20'b11000101000101101000;
			294 : reg_value <= 20'b11000101100010001000;
			295 : reg_value <= 20'b11000101111111110001;
			296 : reg_value <= 20'b11000110011110100011;
			297 : reg_value <= 20'b11000110111110011100;
			298 : reg_value <= 20'b11000111011111011101;
			299 : reg_value <= 20'b11001000000001100100;
			300 : reg_value <= 20'b11001000100100110001;
			301 : reg_value <= 20'b11001001001001000011;
			302 : reg_value <= 20'b11001001101110011010;
			303 : reg_value <= 20'b11001010010100110100;
			304 : reg_value <= 20'b11001010111100010001;
			305 : reg_value <= 20'b11001011100100110001;
			306 : reg_value <= 20'b11001100001110010010;
			307 : reg_value <= 20'b11001100111000110011;
			308 : reg_value <= 20'b11001101100100010100;
			309 : reg_value <= 20'b11001110010000110100;
			310 : reg_value <= 20'b11001110111110010011;
			311 : reg_value <= 20'b11001111101100101110;
			312 : reg_value <= 20'b11010000011100000101;
			313 : reg_value <= 20'b11010001001100011000;
			314 : reg_value <= 20'b11010001111101100110;
			315 : reg_value <= 20'b11010010101111101101;
			316 : reg_value <= 20'b11010011100010101100;
			317 : reg_value <= 20'b11010100010110100011;
			318 : reg_value <= 20'b11010101001011010000;
			319 : reg_value <= 20'b11010110000000110011;
			320 : reg_value <= 20'b11010110110111001001;
			321 : reg_value <= 20'b11010111101110010100;
			322 : reg_value <= 20'b11011000100110010001;
			323 : reg_value <= 20'b11011001011110111110;
			324 : reg_value <= 20'b11011010011000011100;
			325 : reg_value <= 20'b11011011010010101001;
			326 : reg_value <= 20'b11011100001101100011;
			327 : reg_value <= 20'b11011101001001001011;
			328 : reg_value <= 20'b11011110000101011101;
			329 : reg_value <= 20'b11011111000010011010;
			330 : reg_value <= 20'b11100000000000000000;
			331 : reg_value <= 20'b11100000111110001110;
			332 : reg_value <= 20'b11100001111101000011;
			333 : reg_value <= 20'b11100010111100011110;
			334 : reg_value <= 20'b11100011111100011100;
			335 : reg_value <= 20'b11100100111100111110;
			336 : reg_value <= 20'b11100101111110000001;
			337 : reg_value <= 20'b11100110111111100101;
			338 : reg_value <= 20'b11101000000001101000;
			339 : reg_value <= 20'b11101001000100001000;
			340 : reg_value <= 20'b11101010000111000110;
			341 : reg_value <= 20'b11101011001010011111;
			342 : reg_value <= 20'b11101100001110010010;
			343 : reg_value <= 20'b11101101010010011101;
			344 : reg_value <= 20'b11101110010111000000;
			345 : reg_value <= 20'b11101111011011111001;
			346 : reg_value <= 20'b11110000100001000110;
			347 : reg_value <= 20'b11110001100110100111;
			348 : reg_value <= 20'b11110010101100011010;
			349 : reg_value <= 20'b11110011110010011101;
			350 : reg_value <= 20'b11110100111000110000;
			351 : reg_value <= 20'b11110101111111010000;
			352 : reg_value <= 20'b11110111000101111101;
			353 : reg_value <= 20'b11111000001100110101;
			354 : reg_value <= 20'b11111001010011110111;
			355 : reg_value <= 20'b11111010011011000001;
			356 : reg_value <= 20'b11111011100010010010;
			357 : reg_value <= 20'b11111100101001101001;
			358 : reg_value <= 20'b11111101110001000100;
			359 : reg_value <= 20'b11111110111000100010;
			default: reg_value <= 0;
		endcase
	end
endmodule